var jwt = require('jsonwebtoken');

const pass=function(req,res,next){
    let token=req.get('token');
    console.log(token);
    try {
        let data=jwt.verify(token,'asus');
        next();
    } catch (error) {
        res.json({msg:"拒绝访问"})
    }
}

module.exports={pass}